﻿using UnityEngine;

namespace UIModule
{
    public static class UIExtension
    {
        public static void SetActiveByScale(this GameObject obj, bool active)
        {
            if (obj != null)
            {
                obj.transform.localScale = active ? Vector3.zero : Vector3.one;
            }
        }

        public static void SetActiveByPosition(this GameObject obj, bool active)
        {
            if (obj != null)
            {
                obj.transform.localPosition = active ? Vector3.zero : new Vector3(100000, 100000, 0);
            }
        }
    }
}